package com.ydy.netty.mapper;

import com.ydy.common.model.ChatRecord;
import com.ydy.common.model.User;
import com.ydy.common.model.UserFriend;
import com.ydy.common.vo.UserFriendVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface NettyMapper {

    void updateHeadPortraitAndNickName(User user);

    List<UserFriendVo> getUserFriendsList(@Param("userCode") String userCode);

    void addFriend(UserFriend userFriend);

    List<UserFriendVo> getCanAddFriendList(@Param("userCode") String userCode);

    void insertChatRecord(ChatRecord chatRecord);

    List<ChatRecord> queryChatRecord(@Param("userCode") String userCode);

    User queryUserInfo(@Param("userCode")String userCode);

    List<UserFriendVo> queryAddFriendRequestList(@Param("userCode")String userCode);

    void updateUserFriend(UserFriend dto);

    void addGroupChat(@Param("groupCode") String groupCode,
                      @Param("userCodes") Set<String> userCodes,
                      @Param("mappingCode") String mappingCode);

    void insertGroupInfo(@Param("groupCode") String groupCode,
                         @Param("groupName") String groupName);

    List<String> queryGroupChatUsers(@Param("toCode") String toCode);

    List<UserFriendVo> getUserGroupList(@Param("userCode") String userCode);

    List<ChatRecord> queryChatGroupRecord(@Param("userCode") String userCode);
}
